package com.ruoyi.bi.service.model;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.bi.domain.common.DSColumn;
import com.ruoyi.bi.domain.model.Dataset;

import java.sql.*;
import java.util.List;
import java.util.Map;

public interface DatasetService extends IService<Dataset> {

	public List<Dataset> listDataset();

	public void updateDset(Dataset ds);

	public void reloadDset(String dsetId, String dsid) throws Exception;

	public boolean existCol(String colName, JSONArray cols);

	public void insertDset(Dataset ds);

	public void deleteDset(String dsetId);

	public String getDatasetCfg(String dsetId);

	public List<DSColumn> listTableColumns(String dsid, String tname) throws Exception;

	public List<DSColumn> copyValue(ResultSet rs) throws SQLException;

	public String columnType2java(String tp);

	public List<DSColumn> queryMetaAndIncome(JSONObject dataset, String dsid) throws Exception;

	public Map<String, Object> queryDsetDatas(String dsid, String dsetId) throws Exception;

	public List<JSONObject> getJoinInfoByTname(String tname, JSONArray joins);

}
